#include <stdio.h>

int main ()
{

    int money = 20 ;

    int soda = money ;

    int all = 0 ;

    int emp = 0 ;

    while (soda != 0)
    {

        if (soda == 1 && emp == 1)
        {

            all++ ;

            break ;

        }

        all += soda ; 
 

        if (soda % 2 == 0)
        {

            soda /= 2 ;

        }

        else
        {

            soda /= 2 ;

            emp++ ;

        }

    }

    printf("%d" , all) ;

    return 0 ;

}